<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <script>
        function Person(name,age) {
            this.name=name;
            this.age=age;
            this.myString=function () {
                console.log(this.name,this.age);
            }
        }
        var p=new Person('abc',18);
        console.log(p);
        console.log(p.name);
        console.log(p['age']);
        p.myString();

        var obj={name:'agg',show:function () {
                console.log('123');
            }}
       console.log(obj.name);
        obj.show();
        // obj.name();
    </script>
</body>
</html>